﻿<%@ Page Language="VB"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.SessionState" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.Page" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Web.UI.WebControls.WebParts" %>
<%@ Import Namespace="System.Web.UI.HtmlControls" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Configuration" %>

<SolidQCaptchaW><%= w %></SolidQCaptchaW>
    
<script language="VB" runat="server">
    'Visual Validation Value Variable
    Dim w As String = "False"
    
    'Session variables
    Const SolidQCaptchaCode As String = "SolidQCaptchaCode"
    
    Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        'Get session variable
        Dim code As String = Session(SolidQCaptchaCode)
        'Get current w from QueryString
        Dim wqs As String = HttpContext.Current.Request.QueryString("wqs")
        
        'Then compare both
        If Not (String.IsNullOrEmpty(code)) AndAlso Not (String.IsNullOrEmpty(code)) AndAlso String.Equals(code, wqs) Then
            w = "True"
        End If
        
        'Remove all headers and data in the Response.
        Response.Clear()
        'Set the mime type        
        Response.ContentType = "text/xml"
        'Buffer output and send it out in one chunk.
        Response.BufferOutput = True
        'Specify a succesful HTTP status code
        Response.StatusCode = 200
    End Sub
</script>